﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AutomatedTP
{
    /// <summary>
    /// class for storing information about wrap function
    /// </summary>
    public class Wrap : Func
    {

        public bool orig_call { get; set; }
        private List<Operation> before_op = new List<Operation>();
        private List<Operation> after_op = new List<Operation>();
        private List<Operation> replace_op = new List<Operation>();

        public Wrap() : base("wrap")
        { }

        public Wrap(string name, string ret_val, string ret_type, int num_of_param, Dictionary<string, string> input)
            : base(name, "wrap", ret_val, ret_type, num_of_param, input)
        { }


        /// <summary>
        /// Gets the before operation.
        /// </summary>
        /// <returns></returns>
        public List<Operation> GetBefore()
        {
            return before_op;
        }


        /// <summary>
        /// Gets the after operation.
        /// </summary>
        /// <returns></returns>
        public List<Operation> GetAfter()
        {
            return after_op;
        }

        /// <summary>
        /// Gets the replace operation.
        /// </summary>
        /// <returns></returns>
        public List<Operation> GetReplace()
        {
            return replace_op;
        }

        /// <summary>
        /// Adds the before operation.
        /// </summary>
        /// <param name="op">The op.</param>
        public void AddBefore(Operation op)
        {
            before_op.Add(op);
        }

        /// <summary>
        /// Adds the after operation.
        /// </summary>
        /// <param name="op">The op.</param>
        public void AddAfter(Operation op)
        {
            after_op.Add(op);
        }

        /// <summary>
        /// Adds the replace operation.
        /// </summary>
        /// <param name="op">The op.</param>
        public void AddReplace(Operation op)
        {
            replace_op.Add(op);
        }

    }
}
